package za.ac.lance.stableabstractionsprinciple.obeys.model.impl;

import za.ac.lance.composition.model.Animal;

/**
 * File Name: Dog.java
 * Version:
 * Description:
 * Package: za.ac.lance.composition
 * Author: Lance
 * Date: Feb 22, 2012
 */
public class Dog implements Animal
{

    private int barkFrequency;
    private Mammal mammal;

    public Dog(int barkFrequency, Mammal mammal)
    {
        this.barkFrequency = barkFrequency;
        this.mammal = mammal;
    }

    public int getBarkFrequency()
    {
        return barkFrequency;
    }

    public void setBarkFrequency(int barkFrequency)
    {
        this.barkFrequency = barkFrequency;
    }
    
    public Mammal getMammal()
    {
        return mammal;
    }

    public void setMammal(Mammal mammal)
    {
        this.mammal = mammal;
    }

    @Override
    public void action()
    {
        for (int i = 0; i < getBarkFrequency(); i++)
        {
            System.out.println("Dog Barking");
        }
    }
}
